#define _CRT_SECURE_NO_WARNINGS 1
#include<cstdio>
#include<vector>
#include<iostream>
#include<algorithm>
using namespace std;
vector<int>sum;
vector<int>tem;
vector<int> sum1(vector<int>& sum, vector<int>& tem)
{
	vector<int>c;
	int m = 0;

	for (int i = 0; i <= sum.size(); i++)
	{
		if (i < tem.size())
		{
			int a = tem[i] + sum[i];
			m = a / 10;
			c.push_back(a % 10);
		}
		else
		{
			c.push_back(sum[i]);
		}
	}
	return c;
}
int main()
{
	int n;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		tem.push_back(2);
		sum = sum1(sum, tem);
	}
	for (int i = sum.size() - 1; i >= 0; i--)
	{
		cout << sum[i];
	}
	return 0;
}